package com.stylefeng.guns.common.constant.enums;

/**
 * 审核状态
 */
public enum AuditType {
    UnAudit(0, "未审核"),
    AuditEd(1, "已审核");

    private Integer code;

    private String message;

    AuditType(Integer code, String message) {
        this.setCode(code);
        this.setMessage(message);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueOf(Integer status) {
        if (status == null) {
            return "";
        } else {
            for (AuditType s : AuditType.values()) {
                if (s.getCode() == status) {
                    return s.getMessage();
                }
            }
            return "";
        }
    }
}
